package org.airline.dao;

import java.util.List;

import org.airline.entity.Notice;
import org.airline.entity.PageBean;

public interface INoticeDao {

	// 持久化公告对象
	public void saveNotice(Notice notice) throws Exception;

	// 根据ID删除公告对象
	public void deleteNotice(int id) throws Exception;

	// 修改公告对象
	public void updateNotice(Notice notice) throws Exception;

	// 查询所有公告对象
	public List<Notice> getAllNotice() throws Exception;

	// 根据发布时间查询前几条记录
	public List<Notice> getNoticeByDate() throws Exception;
	
	// 根据ID查询公告
	public Notice getNoticeById(int id) throws Exception;
	
	// 分页查询
	public PageBean queryForPage(int pageSize, int page) throws Exception;

	// 根据关键字分页查询
	public PageBean queryForPageByKeyWords(String keyWord, int pageSize,
			int page) throws Exception;

	
}
